package com.lzy.pattern.observer.userdefined;

/**
 * @ClassName: WeixinUser
 * @Description: ConcrereObserver：具体观察者，实现抽象观察者定义的更新接口，以便在得到主题更改通知时更新自身的状态。
 * @Author: LiuZy
 * @Date: 2022/5/1 15:51
 * @Version: 1.0
 */
public class WeixinUser implements Observer{

    private String name;

    public WeixinUser(String name){
        this.name = name;
    }

    @Override
    public void update(String msg) {
        System.out.println(String.format("%s-收到消息：%s", this.name, msg));
    }
}